package com.pojo.req.template;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.util.List;

@Data
public class InsertTemplateReq {
    /**
     * 存储操作集合
     */
    @Size(min = 1,max = 4,message = "请输入正确的集合长度")
    @NotEmpty(message = "操作集合长度不能为空")
    private List<LabelInfo> permission;

    /**
     * 顺序
     */
    @NotNull(message = "菜单顺序不能为空")
    @Min(value = 1,message = "菜单顺序最小为1")
    @Max(value = 99,message = "菜单顺序最大为99")
    private Short sort;

    /**
     * 父级菜单
     */
    private Long parentId;

    /**
     * 路由
     */
    private String path;

    /**
     * 标签
     */
    @NotBlank(message = "请输入标签")
    @Length(max =255,message = "标签只允许255个字符长度")
    private String label;

    /**
     * 图标
     */
    @NotBlank(message = "请输入图标")
    @Length(max =255,message = "图标只允许255个字符长度")
    private String icon;

    /**
     * 菜单名称
     */
    @NotBlank(message = "请输入名称")
    @Length(max =255,message = "名称只允许255个字符长度")
    private String name;
}
